//
//  SCaptchaView.h
//  easyTest
//
//  Created by Samuel on 15/7/21.
//  Copyright (c) 2015年 banggo. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum
{
    SCaptcha_ImagePick = 0,//
    SCaptcha_String = 1,
    SCaptcha_Others = 2,
}SCaptcha;


@protocol SCaptchaViewDelegate;
@interface SCaptchaView : UIView

- (id)initWithSCaptchaStyle:(SCaptcha)style;
@property (assign)BOOL isOpenShake;

@property (assign)SCaptcha style;

@property (nonatomic, strong)NSObject<SCaptchaViewDelegate> *delegate;

- (void)showImmediately;
- (void)showWithAnimation;

- (void)dismissImmediately;
- (void)dismissWithAnimation;

@end




@protocol SCaptchaViewDelegate <NSObject>

@required
/**
 *  获取可移动的方向
 *
 *  @return 0-横向 1-纵向
 */
//- (BOOL)orientationOfSScrollView:(SScrollView *)sScrollView;
//
//- (NSInteger)numberOfSScrollView:(SScrollView *)sScrollView;
//
//- (UIView *)SScrollView:(SScrollView *)sScrollView viewForRowAtIndex:(int)index;


@optional
- (void)sCaptchaView:(SCaptchaView *)sCaptchaView
 didSelectRowAtIndex:(NSInteger)index
             isRight:(BOOL)bools;


- (void)sCaptchaViewDidButton:(UIButton*)button
                      isRight:(BOOL)bools;
@end